<? 

	
	$title="Shop";
	require("required/dbconnect.php");
	require("required/share_function.php");
	$_SESSION['pid']="promotion_news";
	require("required/header.php"); 
	
	
	if(empty($_GET['id']))
	{
		errRedirect(2,"Invalid Access",$_SERVER['PHP_SELF'],0);
	}
	
	$id=mysql_real_escape_string($_GET['id']);
	
	
	
	
	$get=mysql_query("select * from os_announcement where id='$id'")or die(mysql_error());


	if(mysql_num_rows($get)==0)
	{
		errRedirect(2,"Invalid Access",$_SERVER['PHP_SELF'],0);
	}
	
	$a=mysql_fetch_array($get,MYSQL_ASSOC);
	
	if($a['status']==0)
	{
		errRedirect(2,"Invalid Access",$_SERVER['PHP_SELF'],0);
	}
?>
			
<table width="100%" cellpadding="5" cellspacing="0"  >

  <tr>
      <Td valign="top">
          <table width="100%">
              <Td class="page_location">Your Location : <a href="index.php">Home</a>  > 
              <a href="os_announcement_view_all.php">Promotions &amp; News</a> > <?= $a['title'] ?></Td>
          </table>
          <br />
          <table width="100%">
                <tr>
                    <td align="center" width="20%">
                      <?
                          if($a["pic"]=="")
                          {
                              $pic="empty";
                              $piclink="noimage.jpg";
                              $fix="";
                          }
                          else
                          {
                              $piclink=$a['pic'];
                              $width=$a['width'];
                              $height=$a['height'];
                              
                              if($width-$height>0)
                              {
                                  $fix="width=200";
                              }
                              else
                              {
                                  $fix="height=200";
                              }						
                              
                          }					
                      ?>
                     <img src="announcement_pic/<?= $piclink ?>" <?= $fix ?>  style="border:3px solid #66669a" />
                    
                    </td>
                    <td valign="top" width="80%">
                    <font color="#dd430a"><strong><?= $a['title'] ?></strong></font><br />
                    (<?= $a['create_date'] ?>)
                    <br /><br />
                   
                    <?= $a['brief_description'] ?>
                    
                   <br />
					<?= $a['content_eng'] ?>
                    
                    <div align="center"><input type="button" value="View All Announcements" onclick="window.open('os_announcement_view_all.php','_self')" class="button" /></div>
                    </td>
                    
                </tr>                          
               
           </table>
        </Td>
    </tr>		  
</table>
			
<? require("required/footer.php"); ?>	